home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: Time in milliseconds?
- Date: 7 Mar 96 22:50:34 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.826239034@rscernix>
- References: <313F33E0.31CA@cs.tu-berlin.de>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- In <313F33E0.31CA@cs.tu-berlin.de> Tobias Scheffer <scheffer@cs.tu-berlin.de> writes:
-
- >How, in a C program, can I get the time in milliseconds?
-
- You cannot. The best C can offer you for benchmarking purposes is clock().
-
- >I want to measure
- >how much time a procedure takes, but the usual library functions return
- >only seconds, which is to rough. Borland C provides a private library
- >function, but how about unix?
-
- clock() is a standard C function (and the usual resolutions are in the
- 10..20 milliseconds range for most Unices). I doubt Borland has
- something in the milliseconds range, most likely the real resolution of
- their function is 55 milliseconds.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-